<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>学生信息管理系统注册页面</title>
</head>
<style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f2f2f2;
        }
        div {
            width: 300px;
            margin: 100px auto;
            padding: 20px;
            background-color: #fff;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            text-align: center;
        }
        h1 {
            color: #333;
        }
        form {
            margin-top: 20px;
        }
        label {
            display: block;
            margin-bottom: 10px;
            color: #333;
        }
        input[type="text"],
        input[type="password"],
        input[type="email"] {
            width: 100%;
            padding: 10px;
            margin-bottom: 20px;
            border: 1px solid #ccc;
            border-radius: 4px;
            box-sizing: border-box;
        }
        button {
            padding: 10px 20px;
            background-color: #3498db;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        button:hover {
            background-color: #2980b9;
        }
        a {
            color: #3498db;
            text-decoration: none;
            margin-top: 10px;
            display: block;
        }
    </style>
<body>
    <div >
        <h1>学生信息管理系统注册</h1>     
        <form id="registerForm" action="RegisterServlet" method="post">
            <label for="username">用户名：</label>
            <input type="text" id="username" name="username" required>
            <span id="usernameError" ></span><br><br>

            <label for="password">密码：</label>
            <input type="password" id="password" name="password" required><br>

            <label for="confirm_password">确认密码：</label>
            <input type="password" id="confirm_password" name="confirm_password" required>
            <span id="passwordMismatchError" ></span><br><br>
            <label for="email">邮箱：</label>
            <input type="email" id="email" name="email" required><br><br>
            <button type="submit">注册</button>
            <div ><p>已有账号?<a href="login.jsp">立即登录</a></p></div>
        </form>
    </div>
</body>
</html>